home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / amac41.zip / PAGE23.QM < prev    next >
Text File  |  1991-08-26  |  16KB  |  404 lines

  1. *                              (PageMaker)  v2.3g                       8/9/91
  2. *                            Written by Tom Hogshead
  3. *
  4. * ┌────────────────────────────────[ (INDEX) ]───────────────────────────────┐
  5. * │
  6. * │         Macro        Page Breaks         Inserts Page Numbers ?
  7. * │        ───────       ───────────         ────────────────────────────────
  8. * │        (Alt_4)       Yes                 No      )
  9. * │                                                  ) for QMAC txtfiles only
  10. * │        (Alt_5)       Removes             Removes )
  11. * │
  12. * │        (Alt_6)       Auto                No
  13. * │
  14. * │        (Alt_7)       Yes                 No
  15. * │
  16. * │        (Alt_8)        "                  Yes, query
  17. * │
  18. * │        (Alt_9)        "                  Yes, query bar
  19. * │
  20. * │        (Alt_0)       Removes             Removes
  21. * │
  22. * │  @(h)  Jump From Index Line To (Locate) Macro or Item In Document Below
  23. * │
  24. * │(Description)       - PageMaker
  25. * │(Files)             - Included
  26. * │(Change)            - Settings and Running
  27. * │(Macros)            - in PageMaker PAGE23.ZIP
  28. * │(Version)           - History
  29. * │(Other)             - Macros not included
  30. * └──────────────────────────────────────────────────────────────────────────┘
  31.  
  32. * (Description) of (PageMaker):
  33.  
  34. *       The QEdit macros in PageMaker PAGE23.ZIP paginate documents and
  35. *       QMAC txtfiles so page break locations can be seen and moved
  36. *       for better readability.
  37.  
  38. * (Files) Included in PAGE23.ZIP:
  39.  
  40. *   PAGExx.QM     this txtfile of macros
  41. *   PAGExx.MAC    macfile converted from this txtfile with QMAC
  42. *   PAGE.TST      200 line document with line numbers to set parameters
  43. *   PAGE-QM.TST   200 line document with line numbers and asterisk in column 1
  44. *   PAGE.INF      description of macros
  45.  
  46. * (Change) Settings and Running:
  47.  
  48. *       For different settings change ** below with the following
  49. *       formulae: (PL-TM-BM-1)= 53, (TM-2)= 4, .... etc where TM= 6,
  50. *       BM= 6, PL= 66 These macros paginate to 54 lines/page. Remember
  51. *       INSERT must be ON.
  52.  
  53. *       Depending on whether a document is reloaded or re paginated,
  54. *       there may be an extraneous carriage return and/or line feed
  55. *       present that cannot be removed when paginating. You may also
  56. *       see the top margin vary +- 1. Just be aware. Some printers may
  57. *       also handle documents paginated with these macros differently.
  58.  
  59. *       It is important that no lines in a document or a QMAC txtfile
  60. *       contain "page[space]-" or that and the subsequent line will be
  61. *       deleted when using some of the macros.
  62.  
  63. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  64.  
  65. * To BEGIN, just type "START PAGE" <Enter>. All pertinent files will be
  66. * loaded in the "Ring" for viewing, and PAGE23.MAC is read.
  67. * Alternatively, type "START PAGE 0" <Enter> and the disk copies of all
  68. * files in the "Ring" will be loaded ready for editing, saving time.
  69.  
  70. * (Macros)
  71. * ---------
  72. * 
  73. *┌─────────────────────────────────────────────────────────────────────────┐
  74. *│(Alt_4) AUTOMATIC Page Breaks Only, NO Page #'s , for QMAC txtfiles only │
  75. *└─────────────────────────────────────────────────────────────────────────┘
  76. * Be careful not to place page breaks within a macro. QMAC sometimes gets
  77. * confused when page break lines are within macros, especially with labels.
  78. * Place page breaks only between macros.
  79.  
  80. @4 macrobegin
  81.         setprintpagesize  "0" return            * cut off QEdit pagination
  82.  LABEL1:                                        *  & top/bottom margins
  83.  find #12 #27 return "n" return
  84.  jfalse LABEL2:
  85.         delline                                 * delline if FF Esc found
  86.  jump LABEL1:
  87.  LABEL2:
  88.         begfile find #10 return "n" return
  89.  jfalse LABEL3:
  90.         delline                                 * delline if LF found
  91.  jump LABEL2:
  92.  LABEL3:
  93.         begfile
  94.         #10 repeatcmd "3" return                * insert 4 LF's on top
  95.         splitline cursordown                                ** set "3"=(TM-3) **
  96.         begline
  97.  LABEL4:
  98.         cursordown
  99.         repeatcmd "52" return                        ** set "52"=(PL-TM-BM-2) **
  100.  jfalse LABEL5:
  101.               "Cursor  only to between macros, ENTER to set"
  102.                return
  103.                cursorup markline markline
  104.                pause deleteblock begline
  105.         #42 #12 #27 repeatcmd "71" return       * insert asterisk FF 72 Esc's
  106.         #10 repeatcmd "4" return                            ** set "4"=(TM-2) **
  107.         return
  108.  jump LABEL4:                            
  109.  LABEL5:
  110.         endfile
  111.         return
  112.         #42 #12 #27 repeatcmd "77" return
  113.         begfile
  114. *
  115. * 193 bytes Sat  07-28-1990  15:20:09
  116.  
  117. * 
  118. *┌─────────────────────────────────────────────────────────┐
  119. *│(Alt_5) Removes Pagination Only, for QMAC txtfiles only  │
  120. *└─────────────────────────────────────────────────────────┘
  121. @5 macrobegin
  122.  LABEL1:
  123.         begfile find #12 #27 return "n" return
  124.  jfalse LABEL2:
  125.         delline                                 * delline if FF Esc found
  126.  jump LABEL1:
  127.  LABEL2:
  128.         begfile find #10 return "n" return
  129.  jfalse LABEL3:
  130.         delline                                 * delline if LF found
  131.  jump LABEL2:
  132.  LABEL3:
  133.         begfile
  134. *
  135. * 37 bytes Sat  07-28-1990  15:20:29
  136.  
  137. * 
  138. *┌──────────────────────────────────────────────────┐
  139. *│(Alt_6) AUTOMATIC Page Breaks Only, NO Page #'s   │
  140. *└──────────────────────────────────────────────────┘
  141. @6     macrobegin setprintpagesize  "0" return
  142.  lab1: begfile find #12 #27  return "n" return
  143.        jfalse lab2: delline             jump lab1:
  144.  lab2: begfile find #10      return "n" return
  145.        jfalse lab3: delline             jump lab2:
  146.  lab3: begfile find #12      return "n" return
  147.        jfalse lab4: delch               jump lab3:
  148.  lab4: begfile find "page " "-" return "n" return
  149.        jfalse lab5: delline delline     jump lab4:
  150.  lab5: begfile
  151.        #10 repeatcmd "4" return splitline cursordown        ** set "4"=(TM-2) **
  152.  lab6: begline cursordown repeatcmd "53" return      ** set "53"=(PL-TM-BM-1) **
  153.        jfalse lab7: begline #12 #27 repeatcmd "72" return
  154.        #10 repeatcmd "5" return return jump lab6:           ** set "5"=(TM-1) **
  155.  lab7: endfile return begline #12 #27 repeatcmd "78" return begfile
  156. * 136 bytes Sat  07-28-1990  15:20:38
  157.  
  158.  
  159. * 
  160. * ----------------------------------------------------------------------
  161. * @(7) Add Page Breaks To Document Without Page Numbers And      (Alt_7)
  162. *      Remove Previous Pagination Before Pagination
  163. *      66 Lines/Page, Top And Bottom Margins 6
  164. * ----------------------------------------------------------------------
  165.  
  166. *      This macro adds page breaks and top and bottom margins to
  167. *      documents by inserting ASCII formfeed character #12 and linefeed  |
  168. *      character #10.  Escape character #27 is used to make page break   |g
  169. *      locations more visible.  The macro is written to print 54
  170. *      lines/page with a top and bottom margin of 6.  The user may
  171. *      change these settings by changing '**' below using the following
  172. *      formulae and recompiling with QMAC:
  173.  
  174. *                (PL - TM - BM -1) = 53
  175. *                (TM - 2)          =  4
  176. *                (TM - 1)          =  5
  177.  
  178. *      where                    TM =  6
  179. *                               BM =  6
  180. *                               PL = 66
  181.  
  182. *      To run, press @7 with the cursor positioned anywhere in the
  183. *      document.  At each prompt, move the cursor up only to select the
  184. *      preferred location for each page break, and press <enter>.
  185. *      Insert must be ON.
  186.  
  187. @7     macrobegin
  188.        setprintpagesize "0" return
  189.  lab1: begfile
  190.        find #12 #27 return "n" return
  191.        jfalse lab2:
  192.        delline
  193.        jump lab1:
  194.  lab2: begfile
  195.        find #10 return "n" return
  196.        jfalse lab3:
  197.        delline
  198.        jump lab2:
  199.  lab3: begfile
  200.        find #12 return "n" return
  201.        jfalse lab4:
  202.        delch
  203.        jump lab3:
  204.  lab4: begfile
  205.        find "page " "-" return "n" return
  206.        jfalse lab5:
  207.        delline delline
  208.        jump lab4:
  209.  lab5: begfile
  210.        #10 repeatcmd "4" return                     ** set "4"=(TM-2)
  211.        splitline cursordown
  212.  lab6: begline
  213.        cursordown repeatcmd "53" return             ** set "53"=(PL-TM-BM-1)
  214.        jfalse lab7:
  215.        "UP arrow key only, ENTER to set" return
  216.        cursorup markline markline
  217.        pause
  218.        deleteblock
  219.        begline
  220.        #12 #27 repeatcmd "72" return
  221.        #10 repeatcmd "5" return                     ** set "5"=(TM-1)
  222.        return
  223.        jump lab6:
  224.  lab7: endfile
  225.        return
  226.        begline
  227.        #12 #27 repeatcmd "78" return
  228.        begfile
  229. *
  230. * 204 bytes Sat  07-28-1990  15:20:55 (TH @7)
  231. * 204 bytes Sun  08-04-1991  12:15:44 (TH @7, opened up for clarity)
  232.  
  233. * 
  234. *┌────────────────────────────────────────────────────┐
  235. *│(Alt_8) PAGINATE, Add Page #'s, NO Query Bar        │
  236. *└─[Add page # at prompt, then ENTER for next page]───┘
  237. *
  238. @8     macrobegin setprintpagesize  "0" return
  239.  lab1: begfile find #12 #27  return "n" return
  240.        jfalse lab2: delline             jump lab1:
  241.  lab2: begfile find #10      return "n" return
  242.        jfalse lab3: delline             jump lab2:
  243.  lab3: begfile find #12      return "n" return
  244.        jfalse lab4: delch               jump lab3:
  245.  lab4: begfile find "page " "-" return "n" return
  246.        jfalse lab5: delline delline     jump lab4:
  247.  lab5: begfile
  248.        #10 repeatcmd "4" return splitline cursordown        ** set "4"=(TM-2) **
  249.  lab6: begline cursordown repeatcmd "53" return      ** set "53"=(PL-TM-BM-1) **
  250.        jfalse lab7: "UP arrow key only, ENTER to set" return cursorup
  251.        markline markline pause deleteblock begline #12 #27 repeatcmd
  252.       "72" return #10 repeatcmd "5" return  return          ** set "5"=(TM-1) **
  253.       "page " "--" return return cursorup cursorup centerline jump lab6:
  254.  lab7: endfile return begline #12 #27 repeatcmd "78" return begfile
  255.  lab8: find "page " "-" return "n"  return
  256.        jfalse lab9: makectrofscreen cursorright repeatcmd "5" return
  257.        pause jump lab8:
  258.  lab9: begfile
  259. *
  260. * 254 bytes Sat  07-28-1990  15:21:11
  261.  
  262. * 
  263. *┌──────────────────────────────────────────────────┐
  264. *│(Alt_9) PAGINATE, Add Page #'s With Query Bar     │
  265. *└─[Add page # at prompt, then ENTER for next page]─┘
  266. *
  267. @9     macrobegin setprintpagesize  "0" return
  268.  lab1: begfile find #12 #27  return "n" return
  269.        jfalse lab2: delline             jump lab1:
  270.  lab2: begfile find #10      return "n" return
  271.        jfalse lab3: delline             jump lab2:
  272.  lab3: begfile find #12      return "n" return
  273.        jfalse lab4: delch               jump lab3:
  274.  lab4: begfile find "page " "-" return "n" return
  275.        jfalse lab5: delline delline     jump lab4:
  276.  lab5: begfile
  277.        #10 repeatcmd "4" return splitline cursordown        ** set "4"=(TM-2) **
  278.  lab6: begline cursordown repeatcmd "53" return      ** set "53"=(PL-TM-BM-1) **
  279.        jfalse lab7: "UP arrow key only, ENTER to set" return cursorup
  280.        markline markline pause deleteblock begline #12 #27 repeatcmd
  281.        "72" return #10 repeatcmd "5" return  return         ** set "5"=(TM-1) **
  282.        "page " "--" return return cursorup cursorup centerline jump lab6:
  283.  lab7: endfile return begline #12 #27 repeatcmd "78" return begfile
  284.  lab8: find "page " "-" return "n"  return
  285.        jfalse lab9: makectrofscreen begline "Enter page # (start p2) "
  286.        " " repeatcmd "17" return #25 #25 return cursorup begline
  287.        markblockbegin endline markblockend cursordown begline
  288.        wordright cursorright repeatcmd "5" return pause
  289.        cursorup delline cursordown jump lab8:
  290.  lab9: begfile
  291. *
  292. * 327 bytes Sat  07-28-1990  15:21:27
  293.  
  294.  
  295. * 
  296. * ----------------------------------------------------------------------
  297. * @0   Removes Pagination                            (Alt_0)
  298. * ----------------------------------------------------------------------
  299.  
  300. *      This macro removes page breaks, top and bottom margins, and line
  301. *      numbers from a document paginated with any of the macros in
  302. *      PAGExx.QM.  To run, press @0 with the cursor positioned anywhere
  303. *      in the document.  The cursor returns to the file beginning after
  304. *      completion.
  305.  
  306. @0     macrobegin
  307.  lab1: begfile
  308.        find #12 #27 return "n" return
  309.        jfalse lab2:
  310.        delline
  311.        jump lab1:
  312.  lab2: begfile
  313.        find #10 return "n" return
  314.        jfalse lab3:
  315.        delline
  316.        jump lab2:
  317.  lab3: begfile
  318.        find #12 return "n" return
  319.        jfalse lab4: delch
  320.        jump lab3:
  321.  lab4: begfile
  322.        find "page " "-" return "n" return
  323.        jfalse lab5:
  324.        delline delline
  325.        jump lab4:
  326.  lab5: begfile
  327. *
  328. * 78 bytes Sat  07-28-1990  15:21:44 (TH @0)
  329. * 78 bytes Sun  08-04-1991  12:15:29 (TH @0, opened up for clarity)
  330.  
  331. * 
  332. * ----------------------------------------------------------------------
  333. * @(h)  Jump From Index Line To (Locate) Macro or Item In Document Below
  334. * ----------------------------------------------------------------------
  335.  
  336. *        Alt_h can be used to quickly jump from Index Line to the desired
  337. *        item or macro in the document below:
  338.  
  339. *        1. Press Alt and h at the same time. Line 1 is marked to
  340. *           highlight. Cursor down to desired line in Index.
  341.  
  342. *        2. Press Enter. The macro then locates and jumps to the item
  343. *           selected on the cursor line in the document below.
  344.  
  345. *   See BOOKxx.Qm and JMPPOSxx.QM in AMACxx.ZIP for more discussion about
  346. *   using bookmarks and positions markers ( ) to jump to positions in
  347. *   files.
  348.  
  349. @h macrobegin
  350.         unmarkblock                     * Unmark any marked blocks
  351.         defaultwordset                  * In case altwordset on
  352.         begfile                         * Go to file begin
  353.         markline markline               * And highlight line 1
  354.         pause                           * Pause for Index selection
  355.         wordright markword              * Mark first word on line
  356.         copy                            * Copy word to scrap
  357.         endpara                         * Go to end of Index
  358.         makectrofscreen                 * Cursor line center of window
  359.         find "(" paste ")"
  360.         return "I" return               * Find first marked word in doc
  361.         jfalse NOMARK:
  362.         begline                         * If mark found, go to begline
  363.         jump END:
  364.         NOMARK:
  365.         begfile                         * if no mark found, go to begfile
  366.     END:
  367. *
  368. * 33 bytes Wed  07-10-1991  10:11:24 (TH)
  369.  
  370.  
  371.  
  372. * (Other) Macros: See ALLMACRO.INF
  373. *
  374.  
  375. * (Index) is at top of file
  376. *
  377. * (Version) History:
  378. *
  379. *   v1.1-8 misc changes, NO page #'s
  380. *   v1.9 - added page #'s, NO  page # query bar
  381. *   v2.0 - added page #'s with page # query bar
  382. *   v2.1 - summary of latest macros
  383. *   v2.2 - added Alt_4 & 5 to paginate QMAC txtfiles only
  384. *        - added Alt_1 from BookMarker Macros BOOK12.ZIP
  385. *   v2.2a- modified Alt_4 to not place asterisk in column 1 at begfile
  386. *   v2.2b- corrected Alt_4, label2: was on wrong line
  387. *   v2.3 - wrong version of PAGE.TST was in v2.2b, corrected
  388. *        - modified Alt_8,9 & 0 so no lines contain "page[space]-" and
  389. *          therefore necessary lines will not be deleted when paginating
  390. *        - changed Alt_1 to Ctl_1
  391. *   2.3a - Changed other file names in series, this is an update.
  392. *   2.3b - Changed documentation.
  393. *   2.3c - PAGE23.MAC was wrong file. Corrected.
  394. *   2.3d - Modified documentation and added START.BAT.
  395. *   2.3e - Minor documentation changes.
  396. *        - Changed ^1 key to @h.
  397. *   2.3f - Changed @7 and @0 documentation.
  398. *                   (ver 2.3f in AMACxx.ZIP, v4.0)
  399. *   2.3g - Corrected definitions of #10 and #12 on @7.                  8/9/91
  400. *        - Opened up @7 and @0 for clarity, no macro change.            8/9/91
  401. *
  402. *
  403. *
  404.